<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:f="http://java.sun.com/jsf/core">
    <ui:composition>
        <h:body>
            <h:form>
                <rich:panel>
                    <rich:messages globalOnly="true"/>
                    <h:commandButton value="查询" action="#{reportBean.query}"/>
                    <h:panelGroup id="feeDetail">
                        <rich:dataTable value="#{reportBean.report1}" var="col"
                                        style="width:100%;" rows="15">

                            <rich:column style="width:20%">
                                <f:facet name="header">
                                    <h:outputText value="部门"/>
                                </f:facet>
                                <h:outputText value="#{col.deptName}"/>
                            </rich:column>

                            <rich:column style="width:20%">
                                <f:facet name="header">
                                    <h:outputText value="单据类型"/>
                                </f:facet>
                                <h:panelGroup>
                                    <h:outputText rendered="#{col.vouType eq '3'}"  value="借款单"  style="color:green"/>
                                    <h:outputText rendered="#{col.vouType eq '0'}"  value="报销单"  style="color: #74b2e2"/>
                                    <h:outputText rendered="#{col.vouType eq '1'}"  value="差旅费"  style="color:blue"/>
                                    <h:outputText rendered="#{col.vouType eq '6'}"  value="出国差旅"  style="color: #FF8C00"/>
                                    <h:outputText rendered="#{col.vouType eq '4'}"  value="付款申请单"  style="color: #6B8E23"/>
                                    <h:outputText rendered="#{col.vouType eq '5'}"  value="支出证明单"  style="color: #000"/>
                                </h:panelGroup>
                            </rich:column>

                            <rich:column style="text-align: right;">
                                <f:facet name="header">
                                    <h:outputText value="报销金额"/>
                                </f:facet>
                                <h:outputText value="#{col.total}">
                                    <f:convertNumber pattern="#,##0.00" type="number"/>
                                </h:outputText>
                            </rich:column>
                            <f:facet name="footer"><rich:dataScroller/></f:facet>
                        </rich:dataTable>
                    </h:panelGroup>
                </rich:panel>
            </h:form>
        </h:body>
    </ui:composition>
</html>
